#ifndef TEXTUREEDITOR_H
#define TEXTUREEDITOR_H

#include "abstracteditor.h"
class QTabWidget;
class QLineEdit;
class Texture;

class TextureEditor : public AbstractEditor
{
    Q_OBJECT

public:
    class TextureView;
    TextureEditor(QObject* parent = 0);
    bool init();
    void activate();
private slots:
    void onImageFilePathSelected(const QString& path);
};

class TextureEditor::TextureView : public QWidget
{
    Q_OBJECT
public:
    TextureView(QWidget* parent = 0);

private:
    void dragEnterEvent(QDragEnterEvent* pEvent);
    void dropEvent(QDropEvent* pEvent);
    void paintEvent(QPaintEvent*);
    QPointer<Texture> m_texture;
public slots:
    void updateView(QPointer<Texture> texture);
signals:
    void imageDropped(const QString& fileName);
};

#endif // TEXTUREEDITOR_H
